﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Journal.Domain.Models;
using Journal.Resources;

namespace Journal.Front.Presentation.Models.StudentModels
{
    public class StudentPartialEditModel
    {
        public StudentPartialEditModel(User user)
        {
            Name = user.UserInfo.Name;
            Surname = user.UserInfo.Surname;
            GenderId = (int)user.UserInfo.Gender;
            Id = user.Id;
        }

        public StudentPartialEditModel(int groupId)
        {
            GroupId = groupId;
        }

        public StudentPartialEditModel()
        { 
        }

        public string Name { get; set; }

        public string Surname { get; set; }

        [Display(Name = "GenderLabel", ResourceType = typeof(HtmlControlsTitles))]
        public int GenderId { get; set; }

        public int GroupId { get; set; }

        public int Id { get; set; }
    }
}